<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .d1{
            width: 100px;
            height: 100px;
            background: pink;

            /* display: none; */
            display: inline;
        }
        span{
            background: #ccc;
            /* 行级元素默认无法设置宽和高 */
            width: 100px;
            height: 100px;

            /* display: block; */
            display: inline-block;
        }

        a{
            color: #fff;
            text-decoration: none;
            background: #ff7300;
            width: 100px;
            height: 30px;
            display: inline-block;
            text-align: center;
            line-height: 30px;
            border-radius: 3px;
        }
        a:hover{
            background: #fa9039;
        }

        .d2{
            width: 100px;
            height: 100px;
            background: red;

            /* 方式1 */
            /* display: none; */

            /* 方式2 */
            visibility: hidden;
        }
    </style>
</head>
<body>
    <div class="d1">div1</div>
    哈哈
    <span>嘿嘿</span>嘻嘻

    <a href="#">登陆</a>
    <hr>

    <div class="d2"></div>
    吼吼
</body>
</html>